<?php

use yii\db\Migration;
use yii\db\Schema;

/**
 * Class m181030_090301_ADD_FIELD_COST
 */
class m181030_090301_ADD_FIELD_COST extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{cost}}', 'comfirm_id', Schema::TYPE_INTEGER. "(10) DEFAULT '0' COMMENT '确认人' AFTER confirm ");

        $this->addColumn('{{cost}}', 'comfirm_at', Schema::TYPE_DATETIME. " NULL COMMENT '确认时间' AFTER comfirm_id ");
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        echo "m181030_090301_ADD_FIELD_COST cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m181030_090301_ADD_FIELD_COST cannot be reverted.\n";

        return false;
    }
    */
}
